package itheime.com.fileDemo;

import java.io.File;

public class Test2 {
    public static void main(String[] args) {
//        method01();
//        method02();
        File file = new File("E:\\itheima01");
        String name = file.getName();
        System.out.println(name);
    }

    private static void method02() {
        File file = new File("E:\\itheima01");
        boolean exists = file.exists();
        System.out.println(exists);
    }

    private static void method01() {
        File file = new File("E:\\itheima01");
        boolean result1 = file.isFile();
        boolean result2 = file.isDirectory();
        System.out.println(result1);
        System.out.println(result2);
    }
}
